<template>
  <div class="app-container">
    <iframe id="mobsf" :src="url" frameborder="0" scrolling="no" style="width:100%;" />
  </div>
</template>

<script>
export default {
  name: 'OnlineDocuments',
  data() {
    return {
      url: process.env.VUE_APP_BASE_API + '/doc.html'
    }
  },
  mounted() {
    this.changeMobsfIframe()
  },
  methods: {
    /**
     * iframe-高自适应显示
     */
    changeMobsfIframe() {
      const mobsf = document.getElementById('mobsf')
      const deviceHeight = document.body.clientHeight
      mobsf.style.height = (Number(deviceHeight) - 80) + 'px' // 数字是页面布局高度差
    }
  }
}

</script>

<style scoped>
</style>
